
/***************************************************************************************
****************************************************************************************
* FILE		: led.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/05/07		Initial Version
   
****************************************************************************************
****************************************************************************************/

#ifndef _LED_H_
#define _LED_H_

#define powerLedPort _pa
#define powerLedPortAndPin _pa0
#define powerLedPin PIN_0
#define powerLedPinReverse PIN_0_REVERSE
#define powerLedTypeControl _pac
#define powerLedPullUpControl _papu

#define POWER_LED_ON() (powerLedPortAndPin = 1)
#define POWER_LED_OFF() (powerLedPortAndPin = 0)
#define POWER_LED_SWITCH() (powerLedPortAndPin = ~powerLedPortAndPin)

// #define chargeLedPort _pd
// #define chargeLedPortAndPin _pd3
// #define chargeLedPin B0000_1000
// #define chargeLedPinReverse B1111_0111
// #define chargeLedTypeControl _pdc
// #define chargeLedPullUpControl _pdpu

// #define CHARGE_LED_ON() (chargeLedPortAndPin = 1)
// #define CHARGE_LED_OFF() (chargeLedPortAndPin = 0)
// #define CHARGE_LED_SWITCH() (chargeLedPortAndPin = ~chargeLedPortAndPin)

extern void initLEDControlPin(void);
extern void closeLEDPin(void);
extern void systemLEDProcess(void);
extern void chargeLEDProcess(void);

#endif /*_LED_H_*/
